<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html">
<html>
<head>
<title>用户注册</title>
<jsp:include page="./include/header.jsp"></jsp:include>
</head>
<body>
<script>
$(function(){
	$('#isbn_input').on('blur',function(event){
		var input = $('#isbn_input').val();
		$.post('checkUnique.do', {isbn: input}, function(data){
			console.log(data);
			if(data.unique == 'true'){
				$('<span class="glyphicon glyphicon-ok form-control-feedback"></span>')
					.insertAfter('#isbn_input');
			}else {
				$('<span class="glyphicon glyphicon-remove form-control-feedback"></span>')
				.insertAfter('#isbn_input');				
			}
		},'json');	
	
	});
	
	$('#isbn_input').on('focus',function(){
		$('#isbn_input').next().remove();
	});
});
</script>
<jsp:include page="./include/head.jsp"></jsp:include>
<jsp:include page="./include/banner.jsp"></jsp:include>
<div class="login">
		<div class="container">
		<form action="register.do" method="post">
			<div class="col-md-6 login-do1 animated wow fadeInLeft" data-wow-delay=".5s">
				<div class="login-mail">
					<input type="text" placeholder="用户名" name="username" id="isbn_input">
					<i class="glyphicon glyphicon-envelope"></i>
				</div>
				<div class="login-mail">
					<input type="password" placeholder="密码" name="password" id="pwd1">
					<i class="glyphicon glyphicon-lock"></i>
				</div>
				<div class="login-mail">
					<input type="password" placeholder="确认密码" id="pwd2">
					<i class="glyphicon glyphicon-lock"></i>
				</div>
				  <a class="news-letter" href="#">
						 <label class="checkbox1">
						 <input type="checkbox" id="box" name="checkbox" ><i> </i>我同意</label>
					   </a>
	
			</div>
			<div class="col-md-6 login-do animated wow fadeInRight" data-wow-delay=".5s">
				<label class="hvr-sweep-to-top login-sub">
					<input type="submit" value="确定" id="button">
					</label>
					<p>已经注册</p>
				<a href="login.jsp" class="hvr-sweep-to-top">登录</a><br>
                <a   href="admin/adminlogin.jsp"  class="hvr-sweep-to-top">我是卖家</a>
			</div>
			<div class="clearfix"> </div>
			</form>
		</div>


	</div>
	<script>
	$('#button').click(function(){
		var pwd1 = $('#pwd1').val();
		var pwd2 = $('#pwd2').val();
		if(pwd1!=pwd2)
       alert("两次密码不一致，请重新确认");			 
		
	});	

</script>
<jsp:include page="./include/footer.jsp"></jsp:include>
</body>
</html>